package com.cloudkinto.cron;

import com.cloudkinto.service.order.OrderShopifyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * Author Administrator
 *
 * @Des
 * @Version
 * @Date 2021/10/8
 */
@ConditionalOnProperty(prefix = "gbc", name = "scheduling", havingValue = "test")
@Component
public class CronTestService {

    @Autowired
    private OrderShopifyService mShopifyOrderService;

    @Scheduled(cron = "0 5/15 7-22 * * ?")
    @Async
    public void refreshShopifyOrder() {
//        mShopifyOrderService.autoRefreshOrder();
    }
}
